﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PIAE
{
    public partial class ErrorBox : Form
    {
        static ErrorBox instance = null;

        public ErrorBox()
        {
            InitializeComponent();
        }

        public static void showError(String err)
        {
            if (instance == null)
            {
                instance = new ErrorBox();
            }
            err = err.Replace("\n", Environment.NewLine);
            instance.errorDesc.Text = err;
            instance.errorDesc.Select(0, 0);

            instance.label1.Text = MyResourceManager.GetString("PicasaIndependentAlbumExporterEncounteredAProblem");
            instance.label2.Text = MyResourceManager.GetString("PleaseHelpMakingPIAEBetterCopyErrorReportFromWindowAboveAndSendItTo");
            instance.label3.Text = MyResourceManager.GetString("ThankYouInAdvance");
            instance.closeBtn.Text = MyResourceManager.GetString("Close");

            instance.ShowDialog();
        }

        private void closeBtn_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

    }
}
